/**
 * @filename:ContractDetail3 2024-01-01 00:00:00
 * @project com/lwl/blue  V1.0
 * Copyright(c) 2024 <a href=mailto:lanwenliang@yidianlife.com>蓝文良</a> Co. Ltd.
 * All right reserved.
 */
package com.lwl.blue.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lwl.blue.commont.base.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>代码自动生成，请勿修改</p>
 *
 * <p>说明： 采购合同明细表实体类</P>
 *
 * @version: V1.0
 * @author: <a href=mailto:lanwenliang@yidianlife.com>蓝文良</a>
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("contract_detail_3")
public class ContractDetail3 extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "contract_detail_id")
    @ApiModelProperty(name = "contractDetailId", value = "合同明细ID")
    private Long contractDetailId;

    @ApiModelProperty(name = "contractInnerId", value = "合同内码")
    @NotBlank(message = "合同内码不能为空")
    private String contractInnerId;

    @ApiModelProperty(name = "relatedOrderDetailId", value = "关联的订单明细ID")
    private Long relatedOrderDetailId;

    @ApiModelProperty(name = "prodId", value = "产品ID")
    @NotNull(message = "产品ID不能为空")
    private Integer prodId;

    @ApiModelProperty(name = "productName", value = "产品名称")
    private String productName;

    @ApiModelProperty(name = "productSpec", value = "产品规格")
    private String productSpec;

    @ApiModelProperty(name = "installmentNo", value = "分期批次号")
    private Integer installmentNo;

    @ApiModelProperty(name = "installmentExpectedDate", value = "本批次预计交货日期")
    @NotNull(message = "本批次预计交货日期不能为空")
    @JSONField(format = "yyyy-MM-dd")
    private Date installmentExpectedDate;

    @ApiModelProperty(name = "installmentQuantity", value = "本批次数量")
    @NotNull(message = "本批次数量不能为空")
    private Integer installmentQuantity;

    @ApiModelProperty(name = "installmentRatio", value = "本批次占比")
    private BigDecimal installmentRatio;

    @ApiModelProperty(name = "quantity", value = "总数量")
    @NotNull(message = "总数量不能为空")
    private Integer quantity;

    @ApiModelProperty(name = "unit", value = "单位")
    @NotBlank(message = "单位不能为空")
    private String unit;

    @ApiModelProperty(name = "unitPrice", value = "单价")
    @NotNull(message = "单价不能为空")
    private BigDecimal unitPrice;

    @ApiModelProperty(name = "subtotalAmount", value = "分项金额")
    @NotNull(message = "分项金额不能为空")
    private BigDecimal subtotalAmount;

    @ApiModelProperty(name = "taxFreeUnitPrice", value = "不含税单价")
    @NotNull(message = "不含税单价不能为空")
    private BigDecimal taxFreeUnitPrice;

    @ApiModelProperty(name = "taxFreeAmount", value = "不含税金额")
    @NotNull(message = "不含税金额不能为空")
    private BigDecimal taxFreeAmount;

    @ApiModelProperty(name = "taxRate", value = "税率")
    @NotNull(message = "税率不能为空")
    private BigDecimal taxRate;

    @ApiModelProperty(name = "taxAmount", value = "增值税金额")
    @NotNull(message = "增值税金额不能为空")
    private BigDecimal taxAmount;

    @ApiModelProperty(name = "deliveryTerms", value = "交期条款")
    private String deliveryTerms;

    @ApiModelProperty(name = "pickupPeriodStart", value = "本批次提货期限开始")
    @JSONField(format = "yyyy-MM-dd")
    private Date pickupPeriodStart;

    @ApiModelProperty(name = "pickupPeriodEnd", value = "本批次提货期限结束")
    @JSONField(format = "yyyy-MM-dd")
    private Date pickupPeriodEnd;

    @ApiModelProperty(name = "remark", value = "备注")
    private String remark;

    // 关联查询字段
    @TableField(exist = false)
    @ApiModelProperty(name = "itemName", value = "产品名称")
    private String itemName;

    @TableField(exist = false)
    @ApiModelProperty(name = "itemSpec", value = "产品规格")
    private String itemSpec;
}
